home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power Programmierung
/
Power-Programmierung (Tewi)(1994).iso
/
magazine
/
borllexp
/
blx_1_1
/
winfont.h
< prev
Wrap
Text File
|
1991-01-21
|
780b
|
20 lines
#include<windows.h>
#include<string.h>
class WinFont {
LOGFONT lf;
HFONT hFont;
public:
WinFont(void) {
memset(&lf,0,sizeof(LOGFONT));
hFont = NULL;
}
void Create(void) { hFont = CreateFontIndirect(&lf); }
HFONT GetHandle(void) { return hFont; }
void SetFontWeight(int weight) { lf.lfWeight = weight; }
void SetFontCharSet(BYTE charset) { lf.lfCharSet = charset; }
void SetFontPitchAndFamily(BYTE pnf) { lf.lfPitchAndFamily = pnf; }
void SetFontHeight(int height) { lf.lfHeight = height; }
void SetFontWidth(int width) { lf.lfWidth = width; }
void SetFontName(char *name) { strcpy((char *)lf.lfFaceName, name); }
};